package factory;

public class Student {
    private String _name;
    private int _age;
    private String _sex;

    // public Object Student(String name, int age, String sex) {
    //     this._name = name;
    //     this._age = age;
    //     this._sex = sex;
    //     return this;
    // }

    public Student(String name, int age, String sex) {
        this._name=name;
        this._age=age;
        this._sex=sex;
    }

    private void setName(String name) {
        this._name = name;
    }

    private void setAge(int age) {
        this._age = age;
    }

    private void setSex(String sex) {
        this._sex = sex;
    }

    public String getName() {
        return this._name;
    }

    public int getAge() {
        return this._age;
    }

    public String getSex() {
        return this._sex;
    }

    public String doWork() {
        return this._name + " is " + this._sex + " and age is " + this._age;
    }

}
